<template>
  <div class="avue-logo">
    <transition name="fade">
      <span v-if="getScreen(isCollapse)"
            class="avue-logo_subtitle"
            key="0">
        {{ website.logo }}
      </span>
    </transition>
    <transition-group name="fade">
      <template v-if="getScreen(!isCollapse)">
        <!-- 公司名称展示 -->
        <span class="avue-logo_title" key="1">{{ userInfo.parentDeptFullName || userInfo.deptFullName }}</span>
        <div v-if="userInfo.deptLogo!==''&&userInfo.parentDeptFullName===''" class="avue-logo_container">
          <img class="avue-logo_img" :src="userInfo.deptLogo">
        </div>
      </template>
    </transition-group>
  </div>
</template>

<script>
import { mapGetters } from 'vuex';
import { getScreen } from '@/utils/util';

export default {
  name: 'logo',
  data() {
    return {};
  },
  created() {
  },
  computed: {
    ...mapGetters(['isCollapse', 'userInfo'])
  },
  methods: { getScreen }
};
</script>
